package com.li.my_tiny_spring.beans.definition;

import com.li.my_tiny_spring.exception.impl.MyIllegalStateException;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class BeanDefinition {

	private String beanName;
	private String beanClassName;
	
	private Class<?> beanClass;
	private Object bean;
	
	
	private PropertyValues propertyValues;


	public void setBeanClassName(String beanClassName) {
		try {
			this.beanClassName =  beanClassName;
			this.beanClass =  Class.forName(beanClassName);
		} catch (ClassNotFoundException e) {
			throw new MyIllegalStateException(e);
		}
	}
}
